package com.example.tool.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.example.tool.dao.entity.HealthIndexDomain;
import com.example.tool.dao.entity.Person;
import com.example.tool.dao.entity.ReXueCareerWeapon;
import com.example.tool.dao.entity.ReXueGameCareer;

import com.example.tool.greendao.HealthIndexDomainDao;
import com.example.tool.greendao.PersonDao;
import com.example.tool.greendao.ReXueCareerWeaponDao;
import com.example.tool.greendao.ReXueGameCareerDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig healthIndexDomainDaoConfig;
    private final DaoConfig personDaoConfig;
    private final DaoConfig reXueCareerWeaponDaoConfig;
    private final DaoConfig reXueGameCareerDaoConfig;

    private final HealthIndexDomainDao healthIndexDomainDao;
    private final PersonDao personDao;
    private final ReXueCareerWeaponDao reXueCareerWeaponDao;
    private final ReXueGameCareerDao reXueGameCareerDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        healthIndexDomainDaoConfig = daoConfigMap.get(HealthIndexDomainDao.class).clone();
        healthIndexDomainDaoConfig.initIdentityScope(type);

        personDaoConfig = daoConfigMap.get(PersonDao.class).clone();
        personDaoConfig.initIdentityScope(type);

        reXueCareerWeaponDaoConfig = daoConfigMap.get(ReXueCareerWeaponDao.class).clone();
        reXueCareerWeaponDaoConfig.initIdentityScope(type);

        reXueGameCareerDaoConfig = daoConfigMap.get(ReXueGameCareerDao.class).clone();
        reXueGameCareerDaoConfig.initIdentityScope(type);

        healthIndexDomainDao = new HealthIndexDomainDao(healthIndexDomainDaoConfig, this);
        personDao = new PersonDao(personDaoConfig, this);
        reXueCareerWeaponDao = new ReXueCareerWeaponDao(reXueCareerWeaponDaoConfig, this);
        reXueGameCareerDao = new ReXueGameCareerDao(reXueGameCareerDaoConfig, this);

        registerDao(HealthIndexDomain.class, healthIndexDomainDao);
        registerDao(Person.class, personDao);
        registerDao(ReXueCareerWeapon.class, reXueCareerWeaponDao);
        registerDao(ReXueGameCareer.class, reXueGameCareerDao);
    }
    
    public void clear() {
        healthIndexDomainDaoConfig.clearIdentityScope();
        personDaoConfig.clearIdentityScope();
        reXueCareerWeaponDaoConfig.clearIdentityScope();
        reXueGameCareerDaoConfig.clearIdentityScope();
    }

    public HealthIndexDomainDao getHealthIndexDomainDao() {
        return healthIndexDomainDao;
    }

    public PersonDao getPersonDao() {
        return personDao;
    }

    public ReXueCareerWeaponDao getReXueCareerWeaponDao() {
        return reXueCareerWeaponDao;
    }

    public ReXueGameCareerDao getReXueGameCareerDao() {
        return reXueGameCareerDao;
    }

}
